#!/bin/bash
  if [ ! -d "/usr/local/nginx/html/ds-brain/" ]
  then
  	echo "文件夹ds-brain创建中"
  	sudo mkdir /usr/local/nginx/html/ds-brain
  else
  	echo "文件夹ds-brain已经存在"
  fi
  cd /usr/local/nginx/html/ds-brain
  if [ ! -d "/usr/local/nginx/html/ds-brain/backup/" ]
  then
    echo "文件夹backup创建中"
    sudo mkdir /usr/local/nginx/html/ds-brain/backup
  else
    echo "文件夹backup已经存在"
  fi
  if [ -f "/usr/local/nginx/html/ds-brain/dist.tar.gz" ]
  then
    sudo mv /usr/local/nginx/html/ds-brain/dist.tar.gz /usr/local/nginx/html/ds-brain/backup/dist.tar.gz_`date +%Y%m%d-%H%M`
  else
    echo "文件dist.tar.gz不存在"
  fi
  # yarn build:stage
